<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>判断出年份月份</title>
</head>
<body>
    请选择您的出生年月：
    <script>
    document.write("<select name='year'>");
    for(var i=1980;i<=3000;i++){
	document.write("<option value='"+i+"'"+(i==2025?" selected":"")+">"+i+"年</option>");
    }
    document.write("</select> ");
    document.write("<select name='month'>");
    for(var i=1;i<=12;i++){
	document.write("<option value='"+i+"'"+(i==11?" selected":"")+">"+i+"月</option>");
    }
    document.write("</select>");
    </script>
</body>
</html>